feat(activity): show for org members#1052
Conversation
ThibaudDauce
left a comment
There was a problem hiding this comment.
Doesn't work on my machine but maybe not linked to this PR. Seems to have weird side effects with currentOrganization
| const requiredOrganizationPermission = route.meta.requiredOrganizationPermission as (keyof OrganizationReference['permissions'] | undefined) ?? null | ||
| if (requiredOrganizationPermission) { | ||
| const { currentOrganization } = useCurrentOwned() | ||
| if (currentOrganization.value) { | ||
| return currentOrganization.value.permissions[requiredOrganizationPermission] ?? false | ||
| } | ||
|
|
||
| return false | ||
| } |
There was a problem hiding this comment.
Same here… Visiting http://dev.local:3000/admin/datasets/66a7aad2d369533b90b4eb38 with SSR is working (I see the Activities tab) but without SSR while navigating it seems that currentOrganization is null so I don't have the tab… Not sure why…
| if (!permissionValue) { | ||
| throw createError({ statusCode: 401, statusMessage: 'Unauthorized' }) | ||
| } | ||
| } |
There was a problem hiding this comment.
Not sure this middleware is doing something. I can visit http://dev.local:3000/admin/datasets/6727201449625899ea32c0d4/activities without triggering (with the production backend, without being super-admin) because I think currentOrganization.value is null
|
As discussed, activities should show for all members (not only admin) |
No description provided.